derivation of speed of electromagnetic waves